<template>
    <view class="page">
        <div class="header">
            <div class="flex">
                <div>总资产(元)</div>
                <div>规则</div>
            </div>
            <div class="flex money">
                <div class="count">999.9</div>
                <div class="flex btns">
                    <div class="tixian">提现</div>
                    <div class="tixian chongzhi">充值</div>
                </div>
            </div>
            <div class="flex ai-count">
                可用AI设计次数：<span class="count-no"> 10次</span>
                <image
                    class="right-icon"
                    src="https://cos.aitshirt.cn/app-icon/%E8%B7%AF%E5%BE%84%20224%402x.png"
                    alt=""
                ></image>
            </div>
            <div class="tixian-list">
                <div class="tx-item">
                    <div class="tx-title">可提现金额(元)</div>
                    <div class="tx-money">9.9</div>
                    <image
                        class="right-icon"
                        src="https://cos.aitshirt.cn/app-icon/%E8%B7%AF%E5%BE%84%20224%402x.png"
                        alt=""
                    ></image>
                </div>
                <div class="tx-item">
                    <div class="tx-title">累计提现(元)</div>
                    <div class="tx-money">9.9</div>
                    <image
                        class="right-icon"
                        src="https://cos.aitshirt.cn/app-icon/%E8%B7%AF%E5%BE%84%20224%402x.png"
                        alt=""
                    ></image>
                </div>
            </div>
        </div>

      <div class="good-content">
        <div class="tabs">
            <div class="tab active">收入</div>
            <div class="tab">支出</div>
            <div class="tab">提现</div>
            <div class="tab">充值</div>
        </div>

        <div class="good-ul">
            <div
                class="good-li"
                v-for="item in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
                :key="item"
            >
                <div class="image-detail">
                  <div class="image-content">
                      <image
                          src="https://img.alicdn.com/imgextra/i1/O1CN01yjw1Xq1HXZy2Zy5yD_!!6000000000085-2-tps-1200-1200.jpg"
                          alt=""
                      ></image>
                    <div class="like">1</div>
                  </div>
                    <div class="name-sale">
                        <div class="name">XXX作品</div>
                        <div class="sale">销量100次</div>
                    </div>
                </div>
                <div class="price">
                    <div class="money">￥40</div>
                </div>
            </div>
        </div>

        <div class="good-ul pay">
            <MmonePayItem v-for="item in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]" :key="item" />
        </div>

      </div>
    </view>
</template>

<script setup lang="ts">
import MmonePayItem from "@/components/MmonePayItem.vue";
</script>

<style scoped lang="scss">
.flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page {
    background: #f3f7f8;
    padding: 16rpx;
}
.header {
    display: flex;
    flex-direction: column;
    //width: 100%;
    height: 250rpx;
    background: #ffffff;
    box-shadow: 0rpx 2rpx 4rpx 2rpx rgba(0, 0, 0, 0.08);
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 32rpx 16rpx;
    .flex {
        font-weight: 400;
        font-size: 28rpx;
        color: #222222;
        &.money {
            margin: 16rpx 0;
        }
    }
    .count {
      height: 90rpx;
      font-weight: bold;
      font-size: 64rpx;
      color: #F25A27;
      line-height: 90rpx;
    }

    .count-no {
      height: 32rpx;
      font-weight: bold;
      font-size: 24rpx;
      color: #222222;
      line-height: 32rpx;
    }
    .btns {
        gap: 16rpx;
        .tixian {
            width: 120rpx;
            height: 48rpx;
            background: #f3f7f8;
            border-radius: 32rpx 32rpx 32rpx 32rpx;
            font-weight: bold;
            font-size: 28rpx;
            color: #222222;
            line-height: 48rpx;
            text-align: center;
            &.chongzhi {
                background: #f25a27;
                color: #ffffff;
            }
        }
    }

    .ai-count {
        gap: 12rpx;
        height: 32rpx;
        font-weight: 400;
        font-size: 24rpx;
        color: #222222;
        line-height: 32rpx;
        justify-content: flex-start;
        padding: 0 0 32rpx;
        .count {
            font-weight: bold;
        }
        .right-icon {
            width: 12rpx;
            height: 20rpx;
        }
    }

    .tixian-list {
      position: relative;
        display: flex;
        align-items: center;
        height: 66rpx;
        gap: 64rpx;
      &:after {
        position: absolute;
        left: 50%;
        content: "";
        width: 0rpx;
        height: 32rpx;
        border: 1rpx solid #E4E4E4;
        transform: translateX(-50%);
      }
      .tx-item {
        width: 50%;
        display: flex;
        align-items: center;
            font-weight: 400;
            font-size: 24rpx;
            color: #222222;
            line-height: 32rpx;
            .tx-title {
            }
            .tx-money {
                font-weight: bold;
              margin: 0 16rpx;
            }
            .right-icon {
                width: 12rpx;
                height: 20rpx;
                margin-left: auto;
            }
        }
    }
}


.good-content {
  background: #FFFFFF;
  border-radius: 16rpx 16rpx 16rpx 16rpx;
  margin: 16rpx 0;
}
.tabs {
  position: sticky;
  top: 0;
  height: 86rpx;
  display: flex;
  padding: 0 62rpx;
  border: 1rpx solid #E4E4E4;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  z-index: 99;
  .tab {
    font-weight: 400;
    font-size: 28rpx;
    color: #6F6F6F;
    line-height: 38rpx;
    &.active {
      position: relative;
      font-weight: bold;
      &:after {
        position: absolute;
        content: "";
        bottom: -22rpx;
        left: 0;
        width: 100%;
        height: 4rpx;
        background: #F25A27;
        border-radius: 4rpx 4rpx 4rpx 4rpx;
      }
    }
  }
}

.good-ul {
  .good-li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 144rpx;
    padding: 0 16rpx;
    border-bottom: 1rpx solid #E4E4E4;
    .image-detail {
      display: flex;
      .image-content {
        position: relative;
        image {
          width: 72rpx;
          height: 72rpx;
          background: #FFFFFF;
          border: 2rpx solid #707070;
        }
        .like {
          position: absolute;
          top: 0;
          left: 0;
          width: 24rpx;
          height: 24rpx;
          background: #F25A27;
          font-weight: 400;
          font-size: 16rpx;
          color: #FFFFFF;
          line-height: 24rpx;
          text-align: center;
          border-radius: 50%;
        }
      }
      .name-sale {
        margin: 0 16rpx;
        .name {
          font-weight: bold;
          font-size: 28rpx;
          color: #222222;
        }
        .sale {
          font-weight: 400;
          font-size: 24rpx;
          color: #6F6F6F;
          line-height: 32rpx;
          margin: 12rpx 0 0;
        }
      }

    }
  }
}


.pay {
  .pay-li {
    height: 120rpx;
    .image-detail {
      .image-content {
        image {
          width: 72rpx;
          height: 72rpx;
        }
      }
    }
  }
}
</style>
